home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 April
/
CHIP CD (4 - 2007).iso
/
beeld
/
3d
/
ArtOfIllusion24-Mac.dmg
/
Art of Illusion
/
ArtOfIllusion.jar
/
bsh
/
commands
/
rm.bsh
< prev
next >
Wrap
Text File
|
2005-05-23
|
353b
|
22 lines
/**
Remove a file (like Unix rm).
*/
bsh.help.rm = "usage: cd( path )";
boolean rm( String pathname )
{
this.file = pathToFile( pathname );
if ( file == null )
throw new java.io.FileNotFoundException("pathname");
if ( file.isDirectory() ) {
print( pathname + "is a directory" );
return;
}
return file.delete();
}